package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DepartmentsMapper;
import com.ruoyi.system.domain.Departments;
import com.ruoyi.system.service.IDepartmentsService;

/**
 * 部门档案Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-16
 */
@Service
public class DepartmentsServiceImpl implements IDepartmentsService 
{
    @Autowired
    private DepartmentsMapper departmentsMapper;

    /**
     * 查询部门档案
     * 
     * @param deptId 部门档案主键
     * @return 部门档案
     */
    @Override
    public Departments selectDepartmentsByDeptId(String deptId)
    {
        return departmentsMapper.selectDepartmentsByDeptId(deptId);
    }

    /**
     * 查询部门档案列表
     * 
     * @param departments 部门档案
     * @return 部门档案
     */
    @Override
    public List<Departments> selectDepartmentsList(Departments departments)
    {
        return departmentsMapper.selectDepartmentsList(departments);
    }

    /**
     * 新增部门档案
     * 
     * @param departments 部门档案
     * @return 结果
     */
    @Override
    public int insertDepartments(Departments departments)
    {
        return departmentsMapper.insertDepartments(departments);
    }

    /**
     * 修改部门档案
     * 
     * @param departments 部门档案
     * @return 结果
     */
    @Override
    public int updateDepartments(Departments departments)
    {
        return departmentsMapper.updateDepartments(departments);
    }

    /**
     * 批量删除部门档案
     * 
     * @param deptIds 需要删除的部门档案主键
     * @return 结果
     */
    @Override
    public int deleteDepartmentsByDeptIds(String[] deptIds)
    {
        return departmentsMapper.deleteDepartmentsByDeptIds(deptIds);
    }

    /**
     * 删除部门档案信息
     * 
     * @param deptId 部门档案主键
     * @return 结果
     */
    @Override
    public int deleteDepartmentsByDeptId(String deptId)
    {
        return departmentsMapper.deleteDepartmentsByDeptId(deptId);
    }
}
